Optimal. Leaf size=268 \[ -\frac{i f (e+f x) \text{PolyLog}\left (2,-i e^{c+d x}\right )}{a d^2}+\frac{i f (e+f x) \text{PolyLog}\left (2,i e^{c+d x}\right )}{a d^2}+\frac{i f^2 \text{PolyLog}\left (3,-i e^{c+d x}\right )}{a d^3}-\frac{i f^2 \text{PolyLog}\left (3,i e^{c+d x}\right )}{a d^3}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{i f^2 \log (\cosh (c+d x))}{a d^3}+\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}+\frac{(e+f x)^2 \tanh (c+d x) \text{sech}(c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.263905, antiderivative size = 268, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 10, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.345, Rules used = {5571, 4186, 3770, 4180, 2531, 2282, 6589, 5451, 4184, 3475} \[ -\frac{i f (e+f x) \text{PolyLog}\left (2,-i e^{c+d x}\right )}{a d^2}+\frac{i f (e+f x) \text{PolyLog}\left (2,i e^{c+d x}\right )}{a d^2}+\frac{i f^2 \text{PolyLog}\left (3,-i e^{c+d x}\right )}{a d^3}-\frac{i f^2 \text{PolyLog}\left (3,i e^{c+d x}\right )}{a d^3}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{i f^2 \log (\cosh (c+d x))}{a d^3}+\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}+\frac{(e+f x)^2 \tanh (c+d x) \text{sech}(c+d x)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5571
Rule 4186
Rule 3770
Rule 4180
Rule 2531
Rule 2282
Rule 6589
Rule 5451
Rule 4184
Rule 3475
Rubi steps
\begin{align*} \int \frac{(e+f x)^2 \text{sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac{i \int (e+f x)^2 \text{sech}^2(c+d x) \tanh (c+d x) \, dx}{a}+\frac{\int (e+f x)^2 \text{sech}^3(c+d x) \, dx}{a}\\ &=\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}+\frac{(e+f x)^2 \text{sech}(c+d x) \tanh (c+d x)}{2 a d}+\frac{\int (e+f x)^2 \text{sech}(c+d x) \, dx}{2 a}-\frac{(i f) \int (e+f x) \text{sech}^2(c+d x) \, dx}{a d}-\frac{f^2 \int \text{sech}(c+d x) \, dx}{a d^2}\\ &=\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{(e+f x)^2 \text{sech}(c+d x) \tanh (c+d x)}{2 a d}-\frac{(i f) \int (e+f x) \log \left (1-i e^{c+d x}\right ) \, dx}{a d}+\frac{(i f) \int (e+f x) \log \left (1+i e^{c+d x}\right ) \, dx}{a d}+\frac{\left (i f^2\right ) \int \tanh (c+d x) \, dx}{a d^2}\\ &=\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{i f^2 \log (\cosh (c+d x))}{a d^3}-\frac{i f (e+f x) \text{Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac{i f (e+f x) \text{Li}_2\left (i e^{c+d x}\right )}{a d^2}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{(e+f x)^2 \text{sech}(c+d x) \tanh (c+d x)}{2 a d}+\frac{\left (i f^2\right ) \int \text{Li}_2\left (-i e^{c+d x}\right ) \, dx}{a d^2}-\frac{\left (i f^2\right ) \int \text{Li}_2\left (i e^{c+d x}\right ) \, dx}{a d^2}\\ &=\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{i f^2 \log (\cosh (c+d x))}{a d^3}-\frac{i f (e+f x) \text{Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac{i f (e+f x) \text{Li}_2\left (i e^{c+d x}\right )}{a d^2}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{(e+f x)^2 \text{sech}(c+d x) \tanh (c+d x)}{2 a d}+\frac{\left (i f^2\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(-i x)}{x} \, dx,x,e^{c+d x}\right )}{a d^3}-\frac{\left (i f^2\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(i x)}{x} \, dx,x,e^{c+d x}\right )}{a d^3}\\ &=\frac{(e+f x)^2 \tan ^{-1}\left (e^{c+d x}\right )}{a d}-\frac{f^2 \tan ^{-1}(\sinh (c+d x))}{a d^3}+\frac{i f^2 \log (\cosh (c+d x))}{a d^3}-\frac{i f (e+f x) \text{Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac{i f (e+f x) \text{Li}_2\left (i e^{c+d x}\right )}{a d^2}+\frac{i f^2 \text{Li}_3\left (-i e^{c+d x}\right )}{a d^3}-\frac{i f^2 \text{Li}_3\left (i e^{c+d x}\right )}{a d^3}+\frac{f (e+f x) \text{sech}(c+d x)}{a d^2}+\frac{i (e+f x)^2 \text{sech}^2(c+d x)}{2 a d}-\frac{i f (e+f x) \tanh (c+d x)}{a d^2}+\frac{(e+f x)^2 \text{sech}(c+d x) \tanh (c+d x)}{2 a d}\\ \end{align*}
Mathematica [A] time = 11.3621, size = 501, normalized size = 1.87 \[ -\frac{\frac{-6 \left (1+i e^c\right ) e f \text{PolyLog}\left (2,i e^{-c-d x}\right )-6 \left (1+i e^c\right ) f^2 \left (x \text{PolyLog}\left (2,i e^{-c-d x}\right )+\frac{\text{PolyLog}\left (3,i e^{-c-d x}\right )}{d}\right )-\frac{3 \left (1+i e^c\right ) \left (d^2 e^2-4 f^2\right ) \left (d x-\log \left (-e^{c+d x}+i\right )\right )}{d}+6 \left (1+i e^c\right ) d e f x \log \left (1-i e^{-c-d x}\right )+3 \left (1+i e^c\right ) d f^2 x^2 \log \left (1-i e^{-c-d x}\right )+3 x \left (d^2 e^2-4 f^2\right )+3 d^2 e f x^2+d^2 f^2 x^3}{\left (e^c-i\right ) d^2}+\frac{\frac{6 i \left (e^c+i\right ) f \left (d (e+f x) \text{PolyLog}\left (2,-i e^{-c-d x}\right )+f \text{PolyLog}\left (3,-i e^{-c-d x}\right )\right )}{d^3}+\frac{3 \left (1-i e^c\right ) (e+f x)^2 \log \left (1+i e^{-c-d x}\right )}{d}+\frac{(e+f x)^3}{f}}{e^c+i}+\frac{12 i f \sinh \left (\frac{d x}{2}\right ) (e+f x)}{d^2 \left (\cosh \left (\frac{c}{2}\right )+i \sinh \left (\frac{c}{2}\right )\right ) \left (\cosh \left (\frac{1}{2} (c+d x)\right )+i \sinh \left (\frac{1}{2} (c+d x)\right )\right )}-\frac{3 i (e+f x)^2}{d \left (\cosh \left (\frac{1}{2} (c+d x)\right )+i \sinh \left (\frac{1}{2} (c+d x)\right )\right )^2}-x \text{sech}(c) \left (3 e^2+3 e f x+f^2 x^2\right )}{6 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.132, size = 613, normalized size = 2.3 \begin{align*}{\frac{d{x}^{2}{f}^{2}{{\rm e}^{dx+c}}+2\,defx{{\rm e}^{dx+c}}+d{e}^{2}{{\rm e}^{dx+c}}-2\,i{f}^{2}x+2\,{f}^{2}x{{\rm e}^{dx+c}}-2\,ief+2\,ef{{\rm e}^{dx+c}}}{ \left ({{\rm e}^{dx+c}}-i \right ) ^{2}{d}^{2}a}}-{\frac{ief{\it polylog} \left ( 2,-i{{\rm e}^{dx+c}} \right ) }{a{d}^{2}}}-{\frac{i\ln \left ( 1+i{{\rm e}^{dx+c}} \right ) efx}{da}}+{\frac{{\frac{i}{2}}{e}^{2}\ln \left ({{\rm e}^{dx+c}}+i \right ) }{da}}-{\frac{{\frac{i}{2}}{e}^{2}\ln \left ({{\rm e}^{dx+c}}-i \right ) }{da}}-{\frac{{\frac{i}{2}}{c}^{2}{f}^{2}\ln \left ({{\rm e}^{dx+c}}-i \right ) }{a{d}^{3}}}-{\frac{iefc\ln \left ({{\rm e}^{dx+c}}+i \right ) }{a{d}^{2}}}-{\frac{{\frac{i}{2}}\ln \left ( 1-i{{\rm e}^{dx+c}} \right ){c}^{2}{f}^{2}}{a{d}^{3}}}+{\frac{i{f}^{2}{\it polylog} \left ( 3,-i{{\rm e}^{dx+c}} \right ) }{a{d}^{3}}}-{\frac{2\,i{f}^{2}\ln \left ({{\rm e}^{dx+c}} \right ) }{a{d}^{3}}}+{\frac{{\frac{i}{2}}\ln \left ( 1+i{{\rm e}^{dx+c}} \right ){c}^{2}{f}^{2}}{a{d}^{3}}}+{\frac{i\ln \left ( 1-i{{\rm e}^{dx+c}} \right ) cef}{a{d}^{2}}}+{\frac{i{\it polylog} \left ( 2,i{{\rm e}^{dx+c}} \right ){f}^{2}x}{a{d}^{2}}}-{\frac{{\frac{i}{2}}\ln \left ( 1+i{{\rm e}^{dx+c}} \right ){f}^{2}{x}^{2}}{da}}-{\frac{i{\it polylog} \left ( 2,-i{{\rm e}^{dx+c}} \right ){f}^{2}x}{a{d}^{2}}}+{\frac{i\ln \left ( 1-i{{\rm e}^{dx+c}} \right ) efx}{da}}+{\frac{{\frac{i}{2}}\ln \left ( 1-i{{\rm e}^{dx+c}} \right ){f}^{2}{x}^{2}}{da}}+{\frac{{\frac{i}{2}}{c}^{2}{f}^{2}\ln \left ({{\rm e}^{dx+c}}+i \right ) }{a{d}^{3}}}+{\frac{2\,i{f}^{2}\ln \left ({{\rm e}^{dx+c}}-i \right ) }{a{d}^{3}}}-{\frac{i\ln \left ( 1+i{{\rm e}^{dx+c}} \right ) cef}{a{d}^{2}}}+{\frac{iefc\ln \left ({{\rm e}^{dx+c}}-i \right ) }{a{d}^{2}}}-{\frac{i{f}^{2}{\it polylog} \left ( 3,i{{\rm e}^{dx+c}} \right ) }{a{d}^{3}}}+{\frac{ief{\it polylog} \left ( 2,i{{\rm e}^{dx+c}} \right ) }{a{d}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.99471, size = 522, normalized size = 1.95 \begin{align*} -\frac{1}{2} \, e^{2}{\left (\frac{4 \, e^{\left (-d x - c\right )}}{{\left (4 i \, a e^{\left (-d x - c\right )} + 2 \, a e^{\left (-2 \, d x - 2 \, c\right )} - 2 \, a\right )} d} + \frac{i \, \log \left (e^{\left (-d x - c\right )} + i\right )}{a d} - \frac{i \, \log \left (i \, e^{\left (-d x - c\right )} + 1\right )}{a d}\right )} + \frac{-2 i \, f^{2} x - 2 i \, e f +{\left (d f^{2} x^{2} e^{c} + 2 \, e f e^{c} + 2 \,{\left (d e f + f^{2}\right )} x e^{c}\right )} e^{\left (d x\right )}}{a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d^{2} e^{\left (d x + c\right )} - a d^{2}} - \frac{i \,{\left (d x \log \left (i \, e^{\left (d x + c\right )} + 1\right ) +{\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right )\right )} e f}{a d^{2}} + \frac{i \,{\left (d x \log \left (-i \, e^{\left (d x + c\right )} + 1\right ) +{\rm Li}_2\left (i \, e^{\left (d x + c\right )}\right )\right )} e f}{a d^{2}} - \frac{2 i \, f^{2} x}{a d^{2}} - \frac{i \,{\left (d^{2} x^{2} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 2 \, d x{\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 2 \,{\rm Li}_{3}(-i \, e^{\left (d x + c\right )})\right )} f^{2}}{2 \, a d^{3}} + \frac{i \,{\left (d^{2} x^{2} \log \left (-i \, e^{\left (d x + c\right )} + 1\right ) + 2 \, d x{\rm Li}_2\left (i \, e^{\left (d x + c\right )}\right ) - 2 \,{\rm Li}_{3}(i \, e^{\left (d x + c\right )})\right )} f^{2}}{2 \, a d^{3}} + \frac{2 i \, f^{2} \log \left (i \, e^{\left (d x + c\right )} + 1\right )}{a d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 2.38792, size = 1958, normalized size = 7.31 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (f x + e\right )}^{2} \operatorname{sech}\left (d x + c\right )}{i \, a \sinh \left (d x + c\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]